#include "carOnMap.h"
#include "QGraphicsRectWidget.h"
#include <QtCore>
#include <QtGui>
#include "qpropertyanimation.h"
carOnMap::carOnMap(int id)
	:  color(qrand() % 256, qrand() % 256, qrand() % 256)
{	
	
	this->id = id;
	this->StartPos.setX(0);
	this->StartPos.setY(0);
	this->EndPos.setX(0);
	this->EndPos.setY(0);
	this->EntryPos.setX(0);
	this->EntryPos.setY(0);
	
}
void carOnMap::paint(QPainter *painter, const QStyleOptionGraphicsItem *, QWidget *)
{
	painter->setBrush(color);
	painter->drawEllipse(rect());

}

void carOnMap::setEndPos(QPoint newPosition)
{
	this->EndPos = newPosition;
}
